/**
 * 
 */
package com.neal.web.registry;

import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.beans.PropertyEditorRegistrar;
import org.springframework.beans.PropertyEditorRegistry;
import org.springframework.beans.propertyeditors.CustomDateEditor;


/**
 * @author Neal
 * @version 1.0
 * @description 
 */
public class PropertyEditors implements PropertyEditorRegistrar {

	/* (non-Javadoc)
	 * @see org.springframework.beans.PropertyEditorRegistrar#registerCustomEditors(org.springframework.beans.PropertyEditorRegistry)
	 */
	@Override
	public void registerCustomEditors(PropertyEditorRegistry registry) {
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
		dateFormat.setLenient(false);
		registry.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
	}

}
